package com.blb.community.pojo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.math.BigInteger;
import java.time.LocalDateTime;

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("zy_unit")
public class Unit {
    @TableId(value = "unit_Id")
    @JsonSerialize(using= ToStringSerializer.class)
    private BigInteger unitId;
    @JsonSerialize(using= ToStringSerializer.class)
    private BigInteger communityId;
    @JsonSerialize(using= ToStringSerializer.class)
    private BigInteger buildingId;
    private String unitName;
    private String unitCode;
    private Integer unitLevel;
    private BigDecimal unitAcreage;
    private String unitHaveElevator;
    private String createBy;
    private LocalDateTime createTime;
    private String updateBy;
    private LocalDateTime updateTime;
    private String remark;

    @TableField(exist = false)
    private String communityName;

    @TableField(exist = false)
    private String buildingName;

    public String getCommunityName() {
        return communityName;
    }

    public void setCommunityName(String communityName) {
        this.communityName = communityName;
    }

    public String getBuildingName() {
        return buildingName;
    }

    public void setBuildingName(String buildingName) {
        this.buildingName = buildingName;
    }
}
